/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2014-2016 abel533@gmail.com
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package com.cloud.cmt.usermanage.entity.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.cloud.cmt.usermanage.base.BaseEntity;
import com.cloud.cmt.usermanage.entity.Employee;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;

/**
 * User: wcy
 * Date: 2017/10/17
 * Time: 15:42
 */
@Data
@Entity
@Table(name = "user_info")
public class UserInfoVO extends BaseEntity<Long> {

//    @JsonProperty("name")
//    @JSONField(name = "name")
//    @ApiModelProperty(name = "name", notes = "姓名", example = "张三")
//    @Transient
//    private String name;
//
//    @JsonProperty("employee_num")
//    @JSONField(name = "employee_num")
//    @ApiModelProperty(name = "employee_num", notes = "工号", example = "0001")
//    @Transient
//    private String employee_num;

    @JsonProperty("employeeid")
    @JSONField(name = "employeeid")
    @ApiModelProperty(name = "employee", dataType = "com.cloud.cmt.usermanage.entity.Employee", notes = "用户关联人员信息")
    @OneToOne
    @JoinColumn(name="employeeid")
    private Employee employee;

    @JsonProperty("user_name")
    @JSONField(name = "user_name")
    @ApiModelProperty(name = "user_name", notes = "用户名", example = "angela")
    private String userName;
    @ApiModelProperty(name = "password", notes = "密码", example = "angela123")
    private String password;
    //组织机构
    @JsonProperty("org_id")
    @JSONField(name = "org_id")
    @ApiModelProperty(name = "org_id", notes = "所属部门", example = "1")
    private Long orgId;
    @JsonProperty("tenant_id")
    @JSONField(name = "tenant_id")
    @ApiModelProperty(name = "tenant_id", notes = "租户", example = "1")
    private String tenantId;
    @ApiModelProperty(name = "status", notes = "状态（试用0、正式1、废弃-1）", example = "1")
    private Integer status;
    //职位
    @ApiModelProperty(name = "position", notes = "职位", example = "经理")
    private String position;
    @ApiModelProperty(name = "area", notes = "区域", example = "杭州")
    private String area;
    @ApiModelProperty(name = "weixin", notes = "微信号", example = "3344")
    private String weixin;
}
